package com.zhuang.chapter18;

/**
 * @ClassName: StudentMain
 * @Description:TODO(描述这个类的作用)
 * @author: KangXiaoZhuang
 * @date: 2022年10月11日 下午3:01:37
 */
public class StudentMain {

	public static void main(String[] args) {
		Student1 student1 = new Student1();
		Student1 student2 = new Student1();
		student1.setName("小庄");
		student1.setScore(99);
		System.out.println(student1);
		System.out.println("---------------------");
		student2.setName("小康");
		student2.setScore(96);
		System.out.println(student2);
	}

}

class Student1 {
	private String name;
	private int score;

	public Student1() {
	}

	public Student1(String name, int score) {
		super();
		this.name = name;
		this.score = score;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getScore() {
		return score;
	}

	public void setScore(int score) {
		this.score = score;
	}

	@Override
	public String toString() {
		return "Student [name=" + name + ", score=" + score + "]";
	}

}
